//package com.sansi.bleFloodlight.aspect;
//
//import org.aspectj.lang.ProceedingJoinPoint;
//import org.aspectj.lang.annotation.Around;
//import org.aspectj.lang.annotation.Aspect;
//import org.aspectj.lang.annotation.Pointcut;
//
//import io.reactivex.BackpressureStrategy;
//import io.reactivex.Flowable;
//import io.reactivex.android.schedulers.AndroidSchedulers;
//
//@Aspect
//public class MainAspect {
//    private static final String POINTCUT_METHOD = "execution(@com.sansi.bleFloodlight.aop.annotation.Main * *(..))";
//
//
//    @Around("onMainMethod()")
//    public void doMainMethod(final ProceedingJoinPoint joinPoint) throws Throwable {
//        mainMethod(joinPoint);
//    }
//
//    @Pointcut(POINTCUT_METHOD)
//    private void onMainMethod() { }
//
//    private void mainMethod(final ProceedingJoinPoint joinPoint) throws Throwable {
//        Flowable.create(e -> {
//            {
//                try {
//                    joinPoint.proceed();
//                } catch (Throwable throwable) {
//                    throwable.printStackTrace();
//                }
//            }
//        }, BackpressureStrategy.BUFFER)
//                .subscribeOn(AndroidSchedulers.mainThread())
//                .observeOn(AndroidSchedulers.mainThread())
//                .subscribe();
//    }
//}
